package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;
import legumes.shared.domain.ProductVariety;

public class GetProductVaritiesCallback extends SequencableRPCCall<ProductVariety []> {

	private ProductVariety [] pvAr;
	
	public GetProductVaritiesCallback() {
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.getProductVarities(this);
	}

	@Override
	public void onSuccess(ProductVariety [] pvAr_) {
		pvAr = pvAr_;
		callNext();
	}

	public ProductVariety [] getProductVarities() {
		return pvAr;
	}

}
